package org.gp.core.service;

import org.gp.core.entity.TokenModel;

/**
 * Created by Intellij IDEA
 * USER: luoliang
 * DATE: 2017/4/30
 * TIME: 下午10:38
 */
public interface TokenManager {
    /**
     * 随机创建一个token
     *
     * @return
     */
    String createToken(String id);

    /**
     * 验证token
     *
     * @param token
     * @return
     */
    boolean checkToken(TokenModel token);

    void deleteToken(String id);
}
